bx, by,hx, hy= map(int, input().split())
l = [[0 for i in range(by + 1)] for j in range(bx + 1)]
l[0][0] = 1
for i in range(bx + 1):
    for j in range(by + 1):
        if (abs(hx - i) == 2 and abs(hy - j) == 1) or (abs(hx - i) == 1 and abs(hy - j) == 2) or (hx==i and hy==j ):
            l[i][j] = 0
        elif (i == 0 and j == 0):
            l[i][j] = 1
        elif (i == 0 and j != 0):
            l[i][j] = l[i][j - 1]
        elif (j == 0 and i != 0):
            l[i][j] = l[i - 1][j]
        else:
            l[i][j] = l[i - 1][j] + l[i][j - 1]

print(l[bx][by])
